package May._02.homework.work7;

import java.security.Key;
import java.util.HashMap;
import java.util.Map;

public class Main {
    public static void main(String[] args) {
        int[] nums = {2, 7, 11, 15};
        int target=9;
        HashMap<Integer, Integer> map = new HashMap<>();
        Login:for (int i = 0; i <nums.length; i++) {
            for (int j = i; j < nums.length; j++) {
                if(nums[i]+nums[j]==target){
                    map.put(i,j);
                    break Login;
                }
            }

        }
        Map<Object, Object> objectObjectMap;
        map.forEach((key,value)-> System.out.println("["+key+","+value+"]"));
    }
}
